package currentnodeinfo

//节点的状态情况
type CurrentNodeInfo struct {
	//节点的标识:master,slave
	NodeFlag string `json:"node_flag"`
}

//判断是否是master
func (currentNodeinfo *CurrentNodeInfo) DecideMaster() bool {
	return currentNodeinfo.NodeFlag == "master"
}

//设置节点为master
func (currentNodeinfo *CurrentNodeInfo) SetMaster() {
	currentNodeinfo.NodeFlag = "master"
}
